package com.lch.thread.vip.wait_notify;

/**
 * @author: liuchenhui
 * @create: 2019-05-13 22:11
 **/
public class ThreadA extends Thread {

    private Object object;

    public ThreadA(Object object) {
        this.object = object;
    }

    @Override
    public void run() {
        synchronized (object) {
            System.out.println("threadA start");
            try {
                object.wait();
            } catch (Exception e) {
                e.printStackTrace();
            }
            System.out.println("threadA end");
        }
    }
}
